package cn.ce.core.kit;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Properties;

import com.jfinal.kit.PropKit;

public class Lock {

	public static boolean systemLock() {
		Properties properties = PropKit.use("lock.properties").getProperties();
		Integer begin = Integer.parseInt(properties.getProperty("begin"));
		Integer end = Integer.parseInt(properties.getProperty("end"));
		String[] strNow = new SimpleDateFormat("yyyy-MM-dd").format(new Date()).toString().split("-");
		Integer now = Integer.parseInt(strNow[0] + strNow[1] + strNow[2]);
		if (begin <= now && end >= now) {
			return true;
		} else {
			return false;
		}
	}
}
